//
//  FingerprintView.m
//  YTwallet
//
//  Created by ZhangLin on 2019/3/20.
//  Copyright © 2019年 hadrlog. All rights reserved.
//

#import "FingerprintView.h"
#import <Masonry.h>
@implementation FingerprintView

-(instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        [self setupViews];
    }
    return self;
}

-(void)setupViews{
    self.backgroundColor = [UIColor whiteColor];
    
    self.headerImv = [[UIImageView alloc] init];
    self.headerImv.image = [UIImage imageNamed:@"password_head"];
    [self addSubview:self.headerImv];
    [self.headerImv mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self);
        make.top.mas_equalTo(40);
        make.width.mas_equalTo(70);
        make.height.mas_equalTo(70);
    }];
    
    self.tipsLab = [[UILabel alloc] init];
    self.tipsLab.text = @"点击指纹登录";
    self.tipsLab.font = [UIFont systemFontOfSize:14];
    self.tipsLab.textColor = [UIColor colorWithRed:51 / 255.0 green:51 / 255.0 blue:51 / 255.0 alpha:1];
    [self addSubview:self.tipsLab];
    [self.tipsLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self);
        make.top.equalTo(self.headerImv.mas_bottom).offset(20);
    }];
    
    self.fingerPrintBtn = [UIButton buttonWithType:(UIButtonTypeCustom)];
    [self.fingerPrintBtn setImage:[UIImage imageNamed:@"icon_touch_big"] forState:(UIControlStateNormal)];
    [self addSubview:self.fingerPrintBtn];
    [self.fingerPrintBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self);
        make.top.equalTo(self.tipsLab.mas_bottom).offset(60);
        make.width.mas_equalTo(92);
        make.height.mas_equalTo(92);
    }];
    
    self.passwordLoginBtn = [UIButton buttonWithType:(UIButtonTypeCustom)];
    [self.passwordLoginBtn setTitle:@"密码登录" forState:(UIControlStateNormal)];
    self.passwordLoginBtn.titleLabel.font = [UIFont systemFontOfSize:14];
    [self.passwordLoginBtn setTitleColor:[UIColor colorWithRed:91 / 255.0 green:113 / 255.0 blue:255 / 255.0 alpha:1] forState:(UIControlStateNormal)];
    [self addSubview:self.passwordLoginBtn];
    [self.passwordLoginBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self);
        make.bottom.mas_equalTo(-50);
    }];
                                             
                                             
     
}

@end
